<?php

#print stripslashes($_POST['arv']);

$tok = (stripslashes($_POST['arv']));

$var_export = json_decode($tok, true);

$test = clear_empty($var_export);

print_r($test);

function clear_empty($array) {

    foreach($array as $key => $value) {

        if(is_array($value) && !empty($value) && !empty($key)) {
            $temp[$key] = clear_empty($value);
        }
        elseif(!empty($key) && !empty($value)) {
            $temp[$key] = $value;
        }
    }

    return $temp;
}
?>